<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StoreBlogPost extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name'=>'required',
            'number'=>'required',
            'numberState'=>'required',
            'image'=>'required'
        ];
    }
    public function messages()
    {
//        return parent::messages(); // TODO: Change the autogenerated stub
        return [
          'name.required'=>'球队名不能为空',
          'number.required'=>'场数不能为空',
          'numberState.required'=>'胜率不能为空',
          'image.required'=>'图片不能为空'
        ];
    }
}
